﻿<?php
/*
 * Created on Feb 23, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
	if($title == TT_SEARCH){	
		$searchArray = $_GET;
	}
	$PathPrefix = '';
	include('includes/encrypturl.php');
	include('models/info_model.php');
	include('models/transaction_model.php');
	include('models/cityregion_model.php');
	include('models/realestate_model.php');
	include('models/category_model.php');
	include('models/item_model.php');
	include('models/reesnew_model.php');
	include('models/bannerimage_model.php');
	$itemIntro = $infoModel->getFistNewItem(INTRO_ID);
	$itemNews = $infoModel->getFistNewItem(NEWS_ID);
	$itemProject = $infoModel->getFistNewItem(PROJECT_ID);
	$itemService = $infoModel->getFistNewItem(SERVICE_ID);		 
	$info = $infoModel->getCompanyInfo(); 
	
	if(isset($_GET['itemid'])){
		$item = $itemModel->getItemTitleById($_GET['itemid']);
		$title = $item['title'];
	}
	if(isset($_GET['itemdetailid'])){
		$item = $infoModel->getInfoTitleById($_GET['itemdetailid']);
		$title = $item['title'];
	}
	
	if (!headers_sent()){
		header('Content-type: text/html; charset=' . _('utf-8'));
	}
 	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
	echo '<html xmlns="http://www.w3.org/1999/xhtml">';
	echo '<head>';
	echo '<title>'.$title.' - '.$info['companyName'].'</title>';
	echo '<link rel="shortcut icon" href="favicon.ico">';

	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>';
	echo '<meta name="title" content="Thong tin bat dong san"/>';
	echo '<meta name="description" content="Thong tin bat dong san"/>';

	echo '<meta name="keywords" content="lộc thịnh, loc thinh, nhà đất, nha dat, địa ốc, dia oc, bat dong san, bất động sản, cho thuê, cho thue, cần bán, can ban, cần mua, can mua, bất động sản lộc thịnh, bat dong san loc thinh, thông tin nhà đất, thong tin nha dat, thông tin bất động sản, thong tin bat dong san, công ty địa ốc, cong ty dia oc, công ty bất động sản, cong ty bat dong san, địa ốc lộc thịnh, dia oc loc thinh, bat dong san loc thinh"/>';
	echo '<meta name="abstract" content=""/>';
	echo '<meta name="revisit" content="10"/>';
	echo '<meta name="author" content=""/>';
	echo '<meta name="email" content=""/>';
	echo '<meta name="publisher" content=""/>';
	echo '<meta name="copyright" content=""/>';
	echo '<meta http-equiv="content-language" content="vi"/>';

	echo '<link rel="stylesheet" type="text/css" href="css/main.css" ></link>';
	echo '<link rel="stylesheet" type="text/css" href="css/layout.css" ></link>';
	echo '<link rel="stylesheet" type="text/css" href="css/patch.css" ></link>';
	echo '<script type="text/javascript" src="js/prototype-1.6.0.2.js"></script>';
	echo '<script type="text/javascript" language="JavaScript" src="http://vnexpress.net/Service/Forex_Content.js"></script>';?>
	
	<script type="text/javascript">

	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-17354219-1']);
	  _gaq.push(['_trackPageview']);

	  (function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();

	</script>

	<?php 
	echo '</head>';

	echo '<body>';
	echo '<center>';
	echo '<div id="page_margins">';
		echo '<div id="page" class="home">';
			echo '<div id="topnav">';
				echo '<form style="display: inline;" name="quicksearch" method="post" action="#">';	
					echo '<p class="search">';
						echo '<input name="path" type="hidden" value="/quicksearch"/>';
						echo '<input name="expression" type="text" class="search" value="Tìm kiếm" 
								onfocus="if (this.value == \'Tìm kiếm\') this.value = \'\';&#10; this.style.color = \'#464646\'"/>';
						echo '<input type="image" src="images/topnav_search.gif" name="search" class="button"/>';
					echo '</p>';
					echo '<div class="static-sysnav">';
						echo '<ul id="sysnav" class="MenuBarHorizontal">';
							if($session->logged_in){
								echo '<li><a href="controllers/userinfo_controller.php"><img src="images/arrow_down_blue.gif" width="10" height="6" border="0" alt="arrow down"/> Đăng xuất</a></li>';
								echo '<li><a href="addrestate.php"><img src="images/post_pencil.png" width="16" height="16" border="0" alt="arrow down"/><span class="top-menu">Đăng tin</span></a></li>';
								echo '<li><a href="search.php"><img src="images/find.png" width="16" height="16" border="0" alt="arrow down" /><span class="top-menu">Tìm kiếm</span></a></li>';
								echo '<li><a href="editinfo.php"><img src="images/user-info-icon.png" width="16" height="16" alt="arrow down"/><span class="top-menu">'.$session->username.'</span></a></li>';
							}else{
								echo '<li><a href="login.php"><img src="images/group_key.png" width="16" height="16" alt="arrow down"/><span class="top-menu">Đăng nhập</span></a></li>';
								echo '<li><a href="register.php"><img src="images/group_add.png" width="16" height="16" border="0" alt="arrow down"/><span class="top-menu">Đăng ký</span></a></li>';
								echo '<li><a href="search.php"><img src="images/find.png" width="16" height="16" border="0" alt="arrow down" /><span class="top-menu">Tìm kiếm</span></a></li>';
							}									
							echo '<li><a href="#"><img src="images/Vietnam-Flag-icon.png" border="0" alt="CDN" class="flag"/><span class="top-menu">Việt Nam</span></a></li>';		
							echo '<li><a href="#"><img src="images/United-States-Flag-icon.png" border="0" class="flag" alt="GB"/><span class="top-menu">United States</span></a></li>';
						echo '</ul>';
					echo '</div>';				
				echo '</form>';
			echo '</div>';
		
		echo '<div>';
				//echo '<p><h1>'. $info['companyName'] .'</h1></p>';	
	?>
     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
	 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" 
	 width="898" height="150">
	<param name="movie" value="flash/BANNER LOCTHINH.swf">
	 <param name="wmode" value="transparent">
	<param name=quality value=high>
	<embed src="flash/BANNER LOCTHINH.swf" quality=high 
	pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Shockwaveflash" 
	type="application/x-shockwave-flash" 
	width="898" height="150"></embed>
	</object> 
	<?php   	 		
   	 	echo '</div>';
		
		echo '<img src="images/clear.gif" width="12" height="1" border="0" id="home" alt=""/>';
		echo '<div id="nav"> <a id="navigation" name="navigation"></a>';
		
			echo '<div id="nav_main">';
		       	echo '<ul>'; // id="curLevel1"
		       		echo '<li class="first home">';
		       			echo '<a onfocus="if(this.blur)this.blur()" href="index.php" >';
		       				echo '<span class="img_home_icon"><img src="images/clear.gif" width="12" height="13" border="0" id="home" alt=""/></span>Trang chủ<br/>';
		       				echo '<span class="txt_home_themen">Khái quát chung</span>';
		       			echo '</a>';
		       			echo '<span class="bottomHome"><img src="images/clear.gif" width="295" height="19" border="0"/></span>';
		       		echo '</li>';
		       		if(isset($_GET['contenttypeid']) && ($_GET['contenttypeid'] == INTRO_ID)){
						echo '<li class="experts" id="curLevel1">';
					}else{
						echo '<li class="experts">';
		       		}
						echo '<a onfocus="if(this.blur)this.blur()" href="itemcontenttype.php?contenttypeid='.INTRO_ID.'">Giới thiệu<span class="icon-experts"><strong><br/></strong></span></a>';
		       			echo '<span class="mainMenu_bottomLinks">';	 
		       			if (isset($itemIntro)) {
		       				echo '<a onfocus="if(this.blur)this.blur()" title="'.$itemIntro['title'].'" href="itemdetail.php?itemdetailid='.$itemIntro["itemDetailId"].'&contenttypeid='. $itemIntro["rees_contenttype_id"] .'">&nbsp;';
		       					echo truncate($itemIntro['title'], 20).'<img src="images/new.gif" width="28" height="11" border="0"/>'; 
		       				echo '</a>';
		       			}
		       			echo '</span>';	
		       			
		       		echo '</li>';
		       		if(isset($_GET['contenttypeid']) && ($_GET['contenttypeid'] == NEWS_ID)){
						echo '<li class="company" id="curLevel1">';
					}else{
						echo '<li class="company">';
		       		}	       		
		       			echo '<a onfocus="if(this.blur)this.blur()" href="itemcontenttype.php?contenttypeid='.NEWS_ID.'" >Tin tức<span class="icon-companys"><strong><br/></strong></span></a>';
		       			echo '<span class="mainMenu_bottomLinks">';	
		       			if (isset($itemNews)) { 
		       				echo '<a onfocus="if(this.blur)this.blur()" title="'.$itemNews['title'].'" href="itemdetail.php?itemdetailid='.$itemNews["itemDetailId"].'&contenttypeid='. $itemNews["rees_contenttype_id"] .'" >&nbsp;';
		       					echo truncate($itemNews['title'], 20).'<img src="images/new.gif" width="28" height="11" border="0"/>';
		       				echo '</a>'; 
		       			}      				
		       			echo '</span>';
		       		echo '</li>';
		       		if(isset($_GET['contenttypeid']) && ($_GET['contenttypeid'] == PROJECT_ID)){
						echo '<li class="publication" id="curLevel1">';
					}else{
						echo '<li class="publication">';
		       		}		       		
		       			echo '<a onfocus="if(this.blur)this.blur()" href="itemcontenttype.php?contenttypeid='.PROJECT_ID.'">Dự án<span class="icon-publications"><strong><br/></strong></span></a>';
		       			echo '<span class="mainMenu_bottomLinks">';	 
		       			if (isset($itemProject)) {       			
		       				echo '<a onfocus="if(this.blur)this.blur()" title="'.$itemProject['title'].'" href="itemdetail.php?itemdetailid='.$itemProject["itemDetailId"].'&contenttypeid='. $itemProject["rees_contenttype_id"] .'" >&nbsp;';
		       					echo truncate($itemProject['title'], 20).'<img src="images/new.gif" width="28" height="11" border="0"/>';
		       				echo '</a>';	
		       			}       
		       			echo '</span>';	
		       		echo '</li>';
		       		if(isset($_GET['contenttypeid']) && ($_GET['contenttypeid'] == SERVICE_ID)){
						echo '<li class="event" id="curLevel1">';
					}else{
						echo '<li class="event">';
		       		}		       		
		       			echo '<a onfocus="if(this.blur)this.blur()" href="itemcontenttype.php?contenttypeid='.SERVICE_ID.'">Dịch vụ<span class="icon-events"><strong><br/></strong></span></a>';
		       			echo '<span class="mainMenu_bottomLinks">';
		       			if (isset($itemService)) {       	
		       				echo '<a onfocus="if(this.blur)this.blur()" title="'.$itemService['title'].'" href="itemdetail.php?itemdetailid='.$itemService["itemDetailId"].'&contenttypeid='. $itemService["rees_contenttype_id"] .'" >&nbsp;';
		       					echo truncate($itemService['title'], 20).'<img src="images/new.gif" width="28" height="11" border="0"/>';
		       				echo '</a>';
		       			}       				
		       			echo '</span>';
		       		echo '</li>';
		       	echo '</ul>';
	      	echo '</div>';
		echo '</div>';
?>